<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    @include('public.h5_head')
    <title></title>
    <link rel="stylesheet" type="text/css" href="{{ env('CDN_DOMAIN_NAME') }}/css/commoncss/common.css"/>
   <script src="{{ env('CDN_DOMAIN_NAME') }}/js/app.js"></script>
    <script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/pinchzoom.min.js"></script>
    <style>
        .pinch-zoom,.pinch-zoom img{width: 100%;-webkit-user-drag: none;}
        html,body{width:100%;height:100%;}
        .page{width: 100%;height:100%;background-color:black;}
        .swiper_main{ width: 100%;padding-top:30%;height:70%;}
    </style>
</head>
<body>
<div class="page">
    <div class="swiper_main">

    </div>
</div>
<script>
    function GetRequest() {
    var url=location.search;//获取url中"?"符后的字串
    var theRequest = new Object();
    if(url.indexOf("?") != -1){
    var str = url.substr(1);
    strs = str.split("&");
    var img=strs[2].split("=")[1];
    }
    $(".swiper_main").append("<div class='pinch-zoom'><img class='swi_img' src='"+img+"'></div>")
    }
    GetRequest()
    $('div.pinch-zoom').each(function () {
        new RTP.PinchZoom($(this), {});
    });
    $(".pinch-zoom-container").click(function(){
    var url=location.search;//获取url中"?"符后的字串
    var theRequest = new Object();
    if(url.indexOf("?") != -1){
    var str = url.substr(1);
    strs = str.split("&");
    s=strs[1].split("=")[1];
    }
    var good_id = '{{ $_GET['good_id'] }}';
    window.location.href="/produc?good_id="+good_id+"&number="+s+"";
    });
</script>
</body>
</html>
